package com.tfb.dao;

import java.util.List;
import com.tfb.rong.Device;
import com.tlr.device.model.HikiData;
import java.util.Date;
import org.apache.ibatis.annotations.Param;

public interface DeviceMapper {

    int deleteByPrimaryKey(String deviceid);

    int insert(Device record);

    int insertSelective(Device record);

    Device selectByPrimaryKey(String deviceid);

    int updateByPrimaryKeySelective(Device record);

    int updateByPrimaryKey(Device record);

    int updateByDeviceMacSelective(Device record);

    List<Device> selectAllActiveDevice(Device record);

    List<Device> selectBasicActiveDevice(Device record);

    Device selectDeviceInfo(Device record);

    List<Device> selectAllDevice();

    List<Device> selectDevices(Device device);

    List<Device> selectDevicesByMac(Device device);

    List<Device> selectDeviceWithBindedInfoByUserIDAndDeviceType(@Param("userID") String userID, @Param("deviceType") Integer deviceType);

    Device selectDeviceWithBindedInfoByUserIDAndDeviceMac(@Param("userID") String userID, @Param("deviceMac") String deviceMac);
     
    List<Device> selectVehicleDeviceByStatus(int status);
    
    List<HikiData> selectLastHikiDataByMac(@Param("deviceMac") String deviceMac, @Param("currentDate") Date currentDate);
}
